-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added error code for overlapping function signatures #17597
Merged
JelleZijlstra
merged 15 commits into
python:master
from
katconnors:issue-17570-error-code
Sep 18, 2024
Merged
Added error code for overlapping function signatures #17597
JelleZijlstra
merged 15 commits into
python:master
from
katconnors:issue-17570-error-code
Sep 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mypy_primer (2) timed out- wonder if it had the same issue as here: |
This comment has been minimized.
This comment has been minimized.
AlexWaygood
reviewed
Jul 29, 2024
Co-authored-by: Alex Waygood <[email protected]>
This comment has been minimized.
This comment has been minimized.
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
@JelleZijlstra made the requested changes, if you don't mind taking another look. Thanks in advance! |
This comment has been minimized.
This comment has been minimized.
Gentle reminder for review, @JelleZijlstra or @AlexWaygood. Thanks both! |
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
JelleZijlstra
approved these changes
Sep 13, 2024
Diff from mypy_primer, showing the effect of this PR on open source code: pydantic (https://github.com/pydantic/pydantic)
- pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader [misc]
+ pydantic/experimental/pipeline.py:209: error: Overloaded function signature 10 will never be matched: signature 8's parameter type(s) are the same or broader [overload-cannot-match]
- pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader [misc]
+ pydantic/experimental/pipeline.py:212: error: Overloaded function signature 11 will never be matched: signature 8's parameter type(s) are the same or broader [overload-cannot-match]
- pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader [misc]
+ pydantic/experimental/pipeline.py:215: error: Overloaded function signature 12 will never be matched: signature 8's parameter type(s) are the same or broader [overload-cannot-match]
- pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader [misc]
+ pydantic/experimental/pipeline.py:218: error: Overloaded function signature 13 will never be matched: signature 8's parameter type(s) are the same or broader [overload-cannot-match]
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ pandas-stubs/io/excel/_base.pyi:123: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code [unused-ignore]
discord.py (https://github.com/Rapptz/discord.py)
- discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ discord/guild.py:3061: error: Overloaded function signature 3 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
- discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader [misc]
+ discord/guild.py:3076: error: Overloaded function signature 4 will never be matched: signature 2's parameter type(s) are the same or broader [overload-cannot-match]
- discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ discord/ext/commands/core.py:1484: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
- discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ discord/ext/commands/core.py:1544: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
- pytest_robotframework/__init__.py:338: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ pytest_robotframework/__init__.py:338: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
- pytest_robotframework/__init__.py:472: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader [misc]
+ pytest_robotframework/__init__.py:472: error: Overloaded function signature 5 will never be matched: signature 4's parameter type(s) are the same or broader [overload-cannot-match]
- pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader [misc]
+ pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 4's parameter type(s) are the same or broader [overload-cannot-match]
- pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader [misc]
+ pytest_robotframework/__init__.py:476: error: Overloaded function signature 6 will never be matched: signature 5's parameter type(s) are the same or broader [overload-cannot-match]
pandera (https://github.com/pandera-dev/pandera)
+ pandera/schema_inference/pandas.py:25: error: Unused "type: ignore" comment, use narrower [overload-cannot-match] instead of [misc] code [unused-ignore]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ src/prefect/utilities/asyncutils.py:323: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
- src/prefect/client/schemas/objects.py:196: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [misc]
+ src/prefect/client/schemas/objects.py:196: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader [overload-cannot-match]
antidote (https://github.com/Finistere/antidote)
- src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [misc]
+ src/antidote/lib/interface_ext/__init__.py:1303: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [overload-cannot-match]
- src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [misc]
+ src/antidote/lib/interface_ext/__init__.py:1335: error: Overloaded function signature 4 will never be matched: signature 3's parameter type(s) are the same or broader [overload-cannot-match]
|
Looks like checks have passed, and this can be merged when someone has time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #17570. This is my first contribution to mypy! 🐍
Added an error code for overlapping function signatures.
Test in check-errorcodes.test is a derivative of this post: https://stackoverflow.com/q/69341607